package com.cs.usser.web;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RestController;

@Component //消费方
public class MQConsume {
    @RabbitListener(queuesToDeclare = @Queue("simpleQueue"))
    public void handleMessage(String massage){
        System.out.println("处理消息"+massage);
    }
    @RabbitListener(queuesToDeclare = @Queue("simpleQueue"))
    public void handleMessage1(String massage){
        System.out.println("处理消息"+massage);
    }
    @RabbitListener(queuesToDeclare = @Queue("simpleQueue"))
    public void handleMessage2(String massage){
        System.out.println("处理消息"+massage);
    }
}
